package com.l.web.master.system.webnode;

import org.l.qiao.Cluster;
import org.l.qiao.KeyType;
import org.l.qiao.Validate;
import org.l.qiao.annotation.Key;
import org.l.qiao.base.LType;

import java.util.Map;

public class WebNodeOption extends Cluster {


    /**
     * 栏目ID
     */
    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = false)
    public static final String WEB_NODE_ID = "webNodeId";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\s\\w\u4e00-\u9fa5]{1,50}$", nullable = false)
    public static final String TITLE = "title";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^\\w+$", nullable = false)
    public static final String NAME = "name";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = ".*", nullable = false)
    public static final String CHECK = "check";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_INTEGER, check = Validate.INTEGER, nullable = false)
    public static final String INDEX = "index";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^\\w+$", nullable = false)
    public static final String TYPE = "type";

    public WebNodeOption() {
        super();
    }

    public WebNodeOption(Map<String, Object> map) {
        super(map);
    }

}
